package com.ysd.lis.service.emr.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ysd.common.Result;
import com.ysd.lis.entity.emr.EmrItem;
import com.ysd.lis.mapper.emr.EmrItemMapper;
import com.ysd.lis.service.emr.EmrItemService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wh
 * @since 2025-06-05
 */
@Service
public class EmrItemServiceImpl extends ServiceImpl<EmrItemMapper, EmrItem> implements EmrItemService {

    @Override
    public Result findEmrItemList(EmrItem emrItem) {
        List<EmrItem> list = this.list(new LambdaQueryWrapper<EmrItem>().eq(EmrItem::getVersionCode, emrItem.getVersionCode()).eq(EmrItem::getRoleCode, emrItem.getRoleCode()).eq(EmrItem::getDelFlag, 0).orderByAsc(EmrItem::getSeq));
        return Result.succ(1, "查询成功", list);
    }
}
